package com.loser.rpc.sale.fallback;

import com.loser.module.base.common.ApiResponse;
import com.loser.rpc.sale.dto.resp.UserBalanceResp;
import com.loser.rpc.sale.rpc.BalanceFeign;
import org.springframework.stereotype.Component;

@Component
public class BalanceFeignFallBack implements BalanceFeign {

    @Override
    public ApiResponse<UserBalanceResp> getByUserId(Long userId) {
        UserBalanceResp resp = new UserBalanceResp();
        resp.setId(0);
        resp.setUserId(userId);
        resp.setBalance(0L);
        return ApiResponse.ok(resp);
    }

}
